Correct-by-Construction Program Derivation from Specifications to Assembly Language

ثبت نشده
چکیده

We present a Coq-based system to certify the entire process of implementing declarative mathematical specifications with efficient assembly code. That is, we produce formal assemblycode libraries with proofs, in the style of Hoare logic, demonstrating compatibility with relational specifications in higherorder logic. Most code-generation paths from high-level languages involve the introduction of garbage collection and other runtime support for source-level abstractions, but we generate code suitable for resource-constrained embedded systems, using manual memory management and in-place updating of heap-allocated data structures. We start from very high-level source code, applying the Fiat framework to refine set-theory expressions into functional programs; then we further apply Fiat’s refinement tools to translate functional programs into Facade, a simple imperative language without a heap or aliasing; and finally we plug into the assemblygeneration features of the Bedrock framework, where we link with handwritten data-structure implementations and their associated proofs. Each program refinement leads to a proved Hoare-logic specification for an assembly function, with no trust dependencies on any aspect of our synthesis process, which is highly automated.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Compilation Using Correct-by-Construction Program Synthesis

Extracting and compiling certified programs may introduce bugs in otherwise proven-correct code, reducing the extent of the guarantees that proof assistants and correct-byconstruction program-derivation frameworks provide. We present a novel approach to the extraction and compilation of embedded domain-specific languages developed in a proof assistant (Coq), showing how it allows us to extend c...

متن کامل

Extensible Data-Representation Selection for Correct-by-Construction Program Derivation

Program synthesis via refinement is a venerable approach for gradually transforming specifications into executable code, generating a proof trail showing that the final efficient program adheres to the specification. We present the first automated, proof-generating refinement system that invents new data structures to suit the needs of a program, applying global program analysis to understand t...

متن کامل

Automatic Construction of Java Programs from Functional Program Specifications

This paper presents a novel approach to construct Java programs automatically from the input functional program specifications on natural numbers from the constructive proofs of the input specifications using an inductive theorem prover called Poiti′n. The construction of a Java program from the input functional program specification involves two phases. The theorem prover is used to construct ...

متن کامل

Under consideration for publication in Formal Aspects of Computing Assumption Propagation through Annotated Programs

In the correct-by-construction programming methodology, programs are incrementally derived from their formal specifications, by repeatedly applying transformations to partially derived programs. At an intermediate stage in a derivation, users may have to make certain assumptions to proceed further. To ensure that the assumptions hold true at that point in the program, certain other assumptions ...

متن کامل

Algebra of programming in Agda: Dependent types for relational program derivation

Relational program derivation is the technique of stepwise refining a relational specification to a program by algebraic rules. The program thus obtained is correct by construction. Meanwhile, dependent type theory is rich enough to express various correctness properties to be verified by the type checker. We have developed a library, AoPA, to encode relational derivations in the dependently ty...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2014